
# Maintainer: Antonio Rojas <arojas@archlinux.org>

_dbname=elliptic_curves
pkgname=sage-data-$_dbname
pkgver=0.8.1
pkgrel=2
pkgdesc="Database of elliptic curves for SageMath"
arch=(any)
url="https://www.sagemath.org"
license=(GPL)
depends=()
makedepends=(python sqlite)
source=("https://mirrors.mit.edu/sage/spkg/upstream/elliptic_curves/$_dbname-$pkgver.tar.bz2"
        "https://raw.githubusercontent.com/sagemath/sage/6ae960b3db36b628546c0fd3ea0f7f75154edb22/build/pkgs/elliptic_curves/spkg-install")
sha256sums=('5fba5470d9d91f06282ed5edfc45bf0ea1c5f7c8d4837c46234b17be1481fd50'
            '7132d9617bb99198654f18dffbf6ded18ad03de1a46aa6771f565064a3bfad2f')

package() {
  export SAGE_SHARE="$pkgdir"/usr/share
  cd $_dbname-$pkgver
  mkdir src
  cp -r common ellcurves src
  python ../spkg-install

# fix permissions
  chmod 755 "$pkgdir"/usr/share/ellcurves
  chmod 644 "$pkgdir"/usr/share/ellcurves/*
}
